﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="CW1.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" 
            DataSourceID="SqlDataSource1" Width="976px" GridLines="Horizontal">
            <AlternatingRowStyle BackColor="#F7F7F7" />
            <Columns>
                <asp:BoundField DataField="GameName" HeaderText="Game Name" 
                    SortExpression="GameName" />
                <asp:TemplateField HeaderText="Release Date" SortExpression="ReleaseDate">
                    <ItemTemplate>
                        <%# getDate(Eval("ReleaseDate").ToString)%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Platform">
                    <ItemTemplate>
                        <center><%#getPic(Eval("Platform"))%></center>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="SeriesName" HeaderText="Series Name" 
                    SortExpression="SeriesName" />
                <asp:ImageField DataImageUrlField="DetailPic" HeaderText="Picture">
                    <ControlStyle Height="315px" Width="255px" />
                </asp:ImageField>
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <SortedAscendingCellStyle BackColor="#F4F4FD" />
            <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
            <SortedDescendingCellStyle BackColor="#D8D8F0" />
            <SortedDescendingHeaderStyle BackColor="#3E3277" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:WarriorConnection %>" 
            ProviderName="<%$ ConnectionStrings:WarriorConnection.ProviderName %>" 
            SelectCommand="SELECT [Description], [ID], [GameName], [ReleaseDate], [Platform], [SeriesName], [OfficialWebsite], [DetailPic] FROM [GameQuery] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
            <ItemTemplate>
                <%#Eval("Description") %>
            </ItemTemplate>
        </asp:Repeater>
    </p>

    <p>
        <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource1">
            <ItemTemplate>
                <b>Go to Official Website:</b> <a href="<%#Eval("OfficialWebsite")%>"><%#Eval("OfficialWebsite")%></a>
            </ItemTemplate>
        </asp:Repeater>
    </p>
    Like this game and want to rate it? Click <a href="GameRating.aspx?ID=<%=Request.Params("ID") %>">here</a>
    .<br />
    <p>
        <asp:Button ID="btn_ViewComments" runat="server" BackColor="#990000" 
            BorderStyle="None" CssClass="buttonInDetailPage" ForeColor="White" 
            Text="View Comments" Width="143px" />
    </p>
    <br />
    <p>
        <asp:Button ID="btn_TagGame" runat="server" BackColor="#990000" 
            BorderStyle="None" CssClass="buttonInDetailPage" ForeColor="White" 
            Text="Tag this Game" Width="143px" />
    </p>
    <p>
        &nbsp;</p>
</asp:Content>
